package com.example.syd.threadtest;

import android.app.IntentService;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.util.Log;

/**
 * 作者: created by syd on 2018/4/11 17:44
 * 邮箱: sunyuandong@mujinkeji.com
 */
public class MyIntentService extends IntentService {
    public MyIntentService(){
        super("MyIntentService");//调用父类有参构造函数
    }

    @Override
    protected void onHandleIntent(@Nullable Intent intent) {
        //打印当前线程id
        Log.d("MyIntentService","Thread id is " + Thread.currentThread().getId());

    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.d("MyIntentService","onDestroy executed");
    }
}
